package org.itboys.mobile.entity.mysql.wallet;

import org.itboys.mongodb.entity.BaseMySqlEntity;

import java.math.BigDecimal;

/**
 * Created 2017/9/27.
 * 钱包消费记录
 * @author 朱坤涛
 */
public class PearlWalletConsumeRecord extends BaseMySqlEntity {
    private Long memberId; //用户ID
    private Long incomeId; //收益主表ID
    private BigDecimal amount;//交易金额
    private BigDecimal currentAmount;//当前可用金额
    private Integer type;//类型。1，充值，2，充值赠送，3，消费抵扣，4系统返还
    private Integer status;//0未生效，1已生效
    private String remark;//备注

    public PearlWalletConsumeRecord(){}

    public PearlWalletConsumeRecord(Long memberId, Long incomeId, BigDecimal amount, BigDecimal currentAmount, Integer type, Integer status, String remark) {
        this.memberId = memberId;
        this.incomeId = incomeId;
        this.amount = amount;
        this.currentAmount = currentAmount;
        this.type = type;
        this.status = status;
        this.remark = remark;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getIncomeId() {
        return incomeId;
    }

    public void setIncomeId(Long incomeId) {
        this.incomeId = incomeId;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getCurrentAmount() {
        return currentAmount;
    }

    public void setCurrentAmount(BigDecimal currentAmount) {
        this.currentAmount = currentAmount;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * 状态的中文信息
     */
    public String  getTypeStr(){
        String typeStr= "";
        if(type==null)return typeStr;

        switch (type) {
            case 1:
                typeStr="在线充值";
                break;
            case 2:
                typeStr="充值赠送";
                break;
            case 3:
                typeStr="订单消费";
                break;
            case 4:
                typeStr="系统返还";
                break;
            default:
                break;
        }
        return typeStr;
    }

}
